package Dungeon;
import Coordinates.Axis;
import Square.Square;

public class Level<T extends Square> extends RegularDungeon<T> {
	/**
	 * Creates a new level
	 * 
	 * @param 		xDimension
	 * 				The maximum x dimension of the level dungeon
	 * 
	 * @param 		yDimension
	 * 				The maximum y dimension of the level dungeon
	 * 
	 * @effect		This Level is initialized as a new RegularDungeon with given x,y-Dimensions
	 * 				| super(xDimension, yDimension, 1)
	 * 							
	 */
	public Level(long xDimension, long yDimension)
			throws IllegalArgumentException {
		super(xDimension, yDimension, 1);
	}
	
	/**
	 * Method that sets the maxDimensions to the given maxDimension
	 * 
	 * @param 		maxDimension
	 * 				Parameter that contains the value of the maxDimension
	 * 
	 * @param 		axis
	 * 				Enum that resembles the axis on which the maxDimension has effect on
	 * 
	 * @effect		Sets the dimension of the RegularDungeon
	 *				| new.getDungeonDimensions(axis) == maxDimension;
	 *
	 * @throws 		IllegalArgumentException
	 * 				Throws a exception if the the Z.Axis is being changed
	 * 				| (axis == Axis.Z_AXIS)
	 */
	@Override
	public void setDungeonDimension(long maxDimension, Axis axis) throws IllegalArgumentException {
		if(axis == Axis.Z_AXIS && maxDimension != 1)
			throw new IllegalArgumentException();
		super.setDungeonDimension(maxDimension, axis);
	}

	
}
